//
//  VideoTableViewCell.m
//  FloatClouds
//
//  Created by 黄威 on 16/8/30.
//  Copyright © 2016年 黄威. All rights reserved.
//

#import "VideoTableViewCell.h"
#import "Masonry.h"
@implementation VideoTableViewCell

- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier{

    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    
    if (self) {
        
        self.labelOfTitle = [[BaseLabel alloc]init];
        self.labelOfTitle.font = [UIFont fontWithName:@"Helvetica" size:17];
        self.labelOfTitle.numberOfLines = 0;
        [self.contentView addSubview:self.labelOfTitle];
        
        self.labelOfsource = [[BaseLabel alloc]init];
        self.labelOfsource.font = [UIFont fontWithName:@"Helvetica" size:12];
        self.labelOfsource.numberOfLines = 1;
        [self.contentView addSubview:self.labelOfsource];
        
        self.imageViewOfthumb = [[UIImageView alloc]init];
        self.imageViewOfthumb.layer.masksToBounds = YES;
        self.imageViewOfthumb.layer.cornerRadius = 3;
        [self.contentView addSubview:self.imageViewOfthumb];
        
        
    }


    return self;


}


- (void)layoutSubviews{

    [super layoutSubviews];

[self.imageViewOfthumb mas_makeConstraints:^(MASConstraintMaker *make) {
    
    make.top.left.mas_equalTo(5);
    make.bottom.mas_equalTo(-5);
    make.width.mas_equalTo(self.contentView.mas_width).multipliedBy(0.28);
   
}];
    
    [self.labelOfTitle mas_makeConstraints:^(MASConstraintMaker *make) {
        
        make.left.mas_equalTo(self.imageViewOfthumb.mas_right).offset(10);
        make.right.mas_equalTo(-10);
        make.top.mas_equalTo(20);
        make.height.mas_equalTo(self.contentView.mas_height).multipliedBy(0.5);
    }];

    [self.labelOfsource mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.mas_equalTo(self.imageViewOfthumb.mas_right).offset(10);
        make.right.mas_equalTo(-10);
        make.top.mas_equalTo(self.labelOfTitle.mas_bottom).offset(1);
        make.height.mas_equalTo(self.contentView.mas_height).multipliedBy(0.3);
    }];
    
    

}




@end
